const AutoImport = require('unplugin-auto-import/webpack')
const Components = require('unplugin-vue-components/webpack')
const { ElementPlusResolver } = require('unplugin-vue-components/resolvers')

module.exports = {
  publicPath: '/',
  configureWebpack: {
    plugins: [
      AutoImport({
        resolvers: [ElementPlusResolver({ 
          importStyle: 'sass',
          importIcons: true // 确保开启图标自动导入
        })]
      }),
      Components({
        resolvers: [ElementPlusResolver({ 
          importStyle: 'sass',
          importIcons: true // 确保开启图标自动导入
        })]
      })
    ]
  }
}